package com.aw.baselib.widgets

import android.content.Context
import android.util.AttributeSet
import android.view.ViewGroup
import com.scwang.smartrefresh.layout.SmartRefreshLayout

/**
 * @author : hzw
 */
class MySmartRefreshLayout @JvmOverloads constructor(
    context: Context?,
    attrs: AttributeSet? = null
) : SmartRefreshLayout(context, attrs) {
    var mHeaderView: MyRefreshView

    init {
        val layoutParams = ViewGroup.LayoutParams(
            ViewGroup.LayoutParams.MATCH_PARENT,
            ViewGroup.LayoutParams.WRAP_CONTENT
        )
        mHeaderView = MyRefreshView(context, attrs, 0)
        mHeaderView.layoutParams = layoutParams
        addView(mHeaderView, 0)
    }
}